package com.swak.frame.dto.base;

import java.util.HashMap;
import java.util.Map;

/**
 * Command request from Client
 * 
 * @ClassName: Command.java
 * @author: colley.ma
 * @date: 2022/01/25
 */
public abstract class Command implements DTO {

	private static final long serialVersionUID = -5920666523185815291L;

	/** 扩展场景 **/
	protected BizScenario bizScenario;

	 /**
     * This is for extended values
     */
	protected Map<String, String> extValues = new HashMap<String, String>();

	public BizScenario getBizScenario() {
		return bizScenario;
	}

	public void setBizScenario(BizScenario bizScenario) {
		this.bizScenario = bizScenario;
	}

	/**
	 * This is for extended values
	 */
	public Object getExtField(String key) {
		if (extValues != null) {
			return extValues.get(key);
		}
		return null;
	}

	public void putExtField(String fieldName, String value) {
		this.extValues.put(fieldName, value);
	}

	public Map<String, String> getExtValues() {
		return extValues;
	}

	public void setExtValues(Map<String, String> extValues) {
		this.extValues = extValues;
	}
}
